package com.ts.proj.repository;

import com.ts.base.repository.CommonRepository;
import com.ts.proj.entity.FinanceEntity;
import com.ts.util.PageData;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


//说明 字符串：，作为替换字符串 LOWERFinance                Finance

public interface FinanceRepository extends CommonRepository<FinanceEntity> {
    FinanceEntity findByProId(Integer id);

    @Query(value = " select f.id ,f.pro_id proId,f.assign_time assignTime," +
            "f.assign_money assignMoney,f.delete_flag deleteFlag,f.create_time createTime,f.update_time updateTime,p.pro_name proName from ta_finance f ,ta_project p where f.pro_id = p.id and f.delete_flag = 'N' and p.pro_name like %?1% " ,nativeQuery = true )
    List<PageData> findProjectAndFinanceList(String name);
}